<!DOCTYPE html>
<!-- saved from url=(0047)https://doxygen.cpp.org.cn/manual/autolink.html -->
<html lang="zh-hans" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script>(l=location)[p='protocol'][5]||(l[p]='https')</script><meta name="referrer" content="no-referrer"><style>
#sponsors {
  display: none !important;
}
.menu-item {
  text-wrap: nowrap;
}
</style><script>window.minimalAnalytics={trackingId:'G-M2CNWZ52HJ',autoTrack:true}</script>
<script async="" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/index.js.下载"></script>

<meta http-equiv="X-UA-Compatible" content="IE=11">
<meta name="generator" content="Doxygen 1.14.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Doxygen：自动链接生成 - Doxygen 文档生成工具</title>
<link rel="icon" href="https://doxygen.cpp.org.cn/manual/doxygen.ico" type="image/x-icon">
<link href="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/tabs.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/jquery.js.下载"></script>
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/dynsections.js.下载"></script>
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/clipboard.js.下载"></script>
<link href="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/navtree.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/navtreedata.js.下载"></script>
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/navtree.js.下载"></script>
<script type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/cookie.js.下载"></script>
<link href="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/doxygen.css" rel="stylesheet" type="text/css">
<link href="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/doxygen_manual.css" rel="stylesheet" type="text/css">
<link href="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/extra.css" rel="stylesheet" type="text/css">
<script id="navtreeindex0" type="text/javascript" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/navtreeindex0.js.下载"></script></head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><a href="https://doxygen.cpp.org.cn/index.html"><img alt="Logo" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/doxygen_logo.svg" height="35px"></a></td>
  <td class="menu-item"><a href="https://doxygen.cpp.org.cn/manual/index.html">文档</a></td>
  <td class="menu-item"><a href="https://doxygen.cpp.org.cn/manual/changelog.html">更新日志</a></td>
  <td class="menu-item"><a href="https://doxygen.cpp.org.cn/helpers.html">扩展</a></td>
  <td class="menu-item"><a href="https://doxygen.cpp.org.cn/examples.html">示例</a></td>
  <td class="menu-spacer">&nbsp;</td>
  <td class="menu-item" id="download">
      <img class="download-icon" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/download.svg" width="16px" height="16px" alt="下载 doxygen"> <a href="https://doxygen.cpp.org.cn/download.html">下载</a></td>
  <td class="menu-item" id="donate">
     <form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="nav-item d-inline-flex px-1 mx-1">
       <input type="hidden" name="cmd" value="_donations">
       <input type="hidden" value="doxygen@gmail.com" name="business">
       <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
       <input type="hidden" name="lc" value="US">
       <input type="hidden" name="tax" value="0">
       <input type="hidden" name="item_name" value="Doxygen donation">
       <input type="hidden" name="no_shipping" value="1">
       <table class="donate">
         <tbody><tr>
           <td class="donate-button"><input type="image" width="74" height="21" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/btn_donate_SM.gif" border="0" name="submit" alt="Donate to Doxygen with PayPal!"></td>
         </tr>
         <tr>
           <td class="currency"><select size="1" name="currency_code">
               <option selected="selected" value="EUR">€ (欧元)</option>
               <option value="USD">$ (美元)</option>
             </select></td>
         </tr>
       </tbody></table>
     </form>
   </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable" style="width: 256px; height: 829.656px;">
  <div id="nav-tree" style="height: 829.656px;">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync" style="right: 0px;"><div class="nav-sync-icon active" title="click to disable panel synchronization"><span class="sync-icon-left"></span><span class="sync-icon-right"></span></div></div>
    <ul style="display: block;"><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 0px;"><span class="arrowhead opened"></span></span></a><span class="label"><a class="index.html" href="https://doxygen.cpp.org.cn/manual/index.html"><span>Doxygen</span></a></span></div><ul class="children_ul" style="display: block;"><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="index.html" href="https://doxygen.cpp.org.cn/manual/index.html"><span>Overview</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="install.html" href="https://doxygen.cpp.org.cn/manual/install.html"><span>Installation</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="starting.html" href="https://doxygen.cpp.org.cn/manual/starting.html"><span>Getting started</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="docblocks.html" href="https://doxygen.cpp.org.cn/manual/docblocks.html"><span>Documenting the code</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="additional.html" href="https://doxygen.cpp.org.cn/manual/additional.html"><span>Additional Documentation</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="markdown.html" href="https://doxygen.cpp.org.cn/manual/markdown.html"><span>Markdown support</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="lists.html" href="https://doxygen.cpp.org.cn/manual/lists.html"><span>Lists</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="grouping.html" href="https://doxygen.cpp.org.cn/manual/grouping.html"><span>Grouping</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="formulas.html" href="https://doxygen.cpp.org.cn/manual/formulas.html"><span>Including formulas</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="tables.html" href="https://doxygen.cpp.org.cn/manual/tables.html"><span>Including tables</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="diagrams.html" href="https://doxygen.cpp.org.cn/manual/diagrams.html"><span>Graphs and diagrams</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="preprocessing.html" href="https://doxygen.cpp.org.cn/manual/preprocessing.html"><span>Preprocessing</span></a></span></div></li><li><div class="item selected" id="selected"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="autolink.html" href="https://doxygen.cpp.org.cn/manual/autolink.html"><span>Automatic link generation</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="output.html" href="https://doxygen.cpp.org.cn/manual/output.html"><span>Output Formats</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="searching.html" href="https://doxygen.cpp.org.cn/manual/searching.html"><span>Searching</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="customize.html" href="https://doxygen.cpp.org.cn/manual/customize.html"><span>Customizing the output</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="custcmd.html" href="https://doxygen.cpp.org.cn/manual/custcmd.html"><span>Custom Commands</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="external.html" href="https://doxygen.cpp.org.cn/manual/external.html"><span>Linking to external documentation</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="faq.html" href="https://doxygen.cpp.org.cn/manual/faq.html"><span>Frequently Asked Questions</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="trouble.html" href="https://doxygen.cpp.org.cn/manual/trouble.html"><span>Troubleshooting</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="features.html" href="https://doxygen.cpp.org.cn/manual/features.html"><span>Features</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="doxygen_usage.html" href="https://doxygen.cpp.org.cn/manual/doxygen_usage.html"><span>Doxygen usage</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="doxywizard_usage.html" href="https://doxygen.cpp.org.cn/manual/doxywizard_usage.html"><span>Doxywizard usage</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="config.html" href="https://doxygen.cpp.org.cn/manual/config.html"><span>Configuration</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="commands.html" href="https://doxygen.cpp.org.cn/manual/commands.html"><span>Special Commands</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="htmlcmds.html" href="https://doxygen.cpp.org.cn/manual/htmlcmds.html"><span>HTML Commands</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="xmlcmds.html" href="https://doxygen.cpp.org.cn/manual/xmlcmds.html"><span>XML Commands</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="emojisup.html" href="https://doxygen.cpp.org.cn/manual/emojisup.html"><span>Emoji support</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="langhowto.html" href="https://doxygen.cpp.org.cn/manual/langhowto.html"><span>Internationalization</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="perlmod.html" href="https://doxygen.cpp.org.cn/manual/perlmod.html"><span>Perl Module Output</span></a></span></div></li><li><div class="item"><span class="arrow" style="width: 32px;">&nbsp;</span><span class="label"><a class="arch.html" href="https://doxygen.cpp.org.cn/manual/arch.html"><span>Doxygen's Internals</span></a></span></div></li><li><div class="item"><a href="javascript:void(0)"><span class="arrow" style="padding-left: 16px;"><span class="arrowhead closed"></span></span></a><span class="label"><a class="changelog.html" href="https://doxygen.cpp.org.cn/manual/changelog.html"><span>Changelog</span></a></span></div></li></ul></li></ul></div>
     <div id="nav-tree-ads-carbon">
       <script async="" type="text/javascript" src="https:/#/carbon.js?serve=CK7DTK3M&amp;placement=stacknl" id="_carbonads_js"></script>
     </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle">
  </div>
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;"></div><div class="ui-resizable-handle ui-resizable-s" style="z-index: 90;"></div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 90;"></div></div>
<script type="text/javascript">
$(function(){initNavTree('autolink.html','',''); });
</script>
<div id="container" style="grid-template-columns: auto;">
<div id="doc-content" style="margin-left: 256px; height: 829.656px;">
<div><div class="header">
  <div class="headertitle"><div class="title">自动链接生成</div></div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>目录</h3>
<ul>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#linkurl">网页和邮件地址链接</a>
  </li>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#linkclass">类链接</a>
  </li>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#linkfile">文件链接</a>
  </li>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#linkfunc">函数链接</a>
  </li>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#linkother">其他成员链接</a>
  </li>
  <li class="level1">
    <a href="https://doxygen.cpp.org.cn/manual/autolink.html#resolving">类型别名</a>
  </li>
</ul>
</div>
<div class="textblock"><p>大多数文档系统都有特殊的“参见”部分，用于插入指向其他文档片段的链接。虽然 Doxygen 也有一个命令来启动这样一个部分（参见 <a class="el" href="https://doxygen.cpp.org.cn/manual/commands.html#cmdsa">\sa</a>），但它允许你在文档中的任何地方放置这类链接。对于 <img class="formulaInl" alt="{\LaTeX}" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/form_0.png" width="34" height="13"> 文档，会写入页码引用而非链接。此外，文档末尾的索引可用于快速查找成员、类、命名空间或文件的文档。对于 man 页面，不会生成引用信息。</p>
<p>下一节将展示如何为源文件中的各种文档实体生成链接。</p>
<h1 class="doxsection"><a class="anchor" id="linkurl"></a> 网页和邮件地址链接</h1>
<p>Doxygen 会自动将文档中找到的任何 URL 和邮件地址替换为链接 (在 HTML 中)。要手动指定链接文本，请使用 HTML 的 '<span class="tt">a</span>' 标签</p><pre class="fragment"><div class="clipboard" title="Copy to clipboard"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#888" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></div>&lt;a href="linkURL"&gt;link text&lt;/a&gt; </pre><p>Doxygen 会将其自动翻译成其他输出格式。</p>
<h1 class="doxsection"><a class="anchor" id="linkclass"></a> 类链接</h1>
<p>文档中所有对应于已文档化的类且包含至少一个非小写字符的词，都会被自动替换为指向该类文档页面的链接。如果你想阻止某个对应于已文档化的类的词被替换为链接，应在该词前面加上 %。要链接到全小写符号，请使用 <a class="el" href="https://doxygen.cpp.org.cn/manual/commands.html#cmdref">\ref</a>。</p>
<h1 class="doxsection"><a class="anchor" id="linkfile"></a> 文件链接</h1>
<p>所有包含非最后一个字符的点的词 (<span>.</span>) 都被认为是文件名。如果该词确实是已文档化的输入文件的名称，将自动创建指向该文件文档的链接。</p>
<h1 class="doxsection"><a class="anchor" id="linkfunc"></a> 函数链接</h1>
<p>当遇到以下模式之一时，会创建函数链接：</p><ol>
<li>
<span class="tt">&lt;函数名&gt;"("&lt;参数列表&gt;")"</span> </li>
<li>
<span class="tt">&lt;函数名&gt;"()"</span> </li>
<li>
<span class="tt">"::"&lt;函数名&gt;</span> </li>
<li>
<span class="tt">(&lt;类名&gt;"::")<sup>n</sup>&lt;函数名&gt;"("&lt;参数列表&gt;")"</span> </li>
<li>
<span class="tt">(&lt;类名&gt;"::")<sup>n</sup>&lt;函数名&gt;"("&lt;参数列表&gt;")"&lt;修饰符&gt;</span> </li>
<li>
<span class="tt">(&lt;类名&gt;"::")<sup>n</sup>&lt;函数名&gt;"()"</span> </li>
<li>
<span class="tt">(&lt;类名&gt;"::")<sup>n</sup>&lt;函数名&gt;</span> </li>
</ol>
<p>其中 n&gt;0。</p>
<dl class="section user"><dt>注 1</dt><dd>函数参数应使用正确的类型指定，例如 'fun(const std::string&amp;,bool)' 或 '()' 以匹配任何原型。</dd></dl>
<dl class="section user"><dt>注 2</dt><dd>需要成员函数修饰符（如 'const' 和 'volatile'）来识别目标，例如 'func(int) const' 和 'func(int)' 目标不同的成员函数。</dd></dl>
<dl class="section user"><dt>注 3</dt><dd>为了与 Javadoc 兼容，在上述模式中可以使用 # 代替 ::。</dd></dl>
<dl class="section user"><dt>注 4</dt><dd>在包含成员 foo 的类的文档中，使用 "::foo" 引用全局变量，而 #foo 将链接到该成员。</dd></dl>
<p>对于非重载成员，参数列表可以省略。</p>
<p>如果函数被重载但未指定匹配的参数列表（即使用模式 2 或 6），则将创建指向其中一个重载成员文档的链接。</p>
<p>对于成员函数，如果满足以下条件，可以省略类作用域（如模式 4 到 7 中使用的）：</p><ol>
<li>该模式指向与包含该模式的文档块属于同一类的已文档化成员。</li>
<li>与包含该模式的文档块对应的类具有一个基类，该基类包含一个与该模式匹配的已文档化成员。</li>
</ol>
<h1 class="doxsection"><a class="anchor" id="linkother"></a> 其他成员链接</h1>
<p>所有这些实体都可以按照上一节中描述的方式进行链接。为了清晰起见，在这种情况下建议只使用模式 3 和 7。</p>
<dl class="section user"><dt>示例</dt><dd><div class="fragment"><div class="clipboard" title="Copy to clipboard"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#888" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></div><div class="line"><span class="comment">/*! \file autolink.cpp</span></div>
<div class="line"><span class="comment">测试自动链接生成。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向 Autolink_Test 类成员的链接：Autolink_Test::member,</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向每个重载成员的更具体链接</span></div>
<div class="line"><span class="comment">Autolink_Test::member(int) and Autolink_Test#member(int,int)</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">指向 Autolink_Test 的 protected 成员变量的链接：Autolink_Test#var,</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">指向全局枚举类型 #GlobEnum 的链接。</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment">指向宏定义 #ABS(x) 的链接。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向 Autolink_Test 类析构函数的链接：Autolink_Test::~Autolink_Test,</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向 typedef ::B 的链接。</span></div>
<div class="line"><span class="comment"> </span></div>
<div class="line"><span class="comment">指向枚举类型 Autolink_Test::EType 的链接</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向一些枚举值 Autolink_Test::Val1 和 ::GVal2 的链接</span></div>
<div class="line"><span class="comment">*/</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*!</span></div>
<div class="line"><span class="comment">此文档块属于 Autolink_Test 类，也可以通过</span></div>
<div class="line"><span class="comment">使用 #Autolink_Test 进行链接。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">链接到构造函数：#Autolink_Test() 和 Autolink_Test()。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">链接到析构函数：#~Autolink_Test 和 ~Autolink_Test()。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">链接到此类的成员：member()。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">指向每个重载成员的更具体链接</span></div>
<div class="line"><span class="comment">member(int) and member(int,int)。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">链接到变量 #var。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">链接到全局 typedef ::B。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">指向全局枚举类型 #GlobEnum 的链接。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">链接到宏 ABS(x)。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向变量 \link #var 使用其他文本\endlink 的链接。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">指向枚举类型 #EType 的链接。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">指向一些枚举值：\link Autolink_Test::Val1 Val1 \endlink 和 ::GVal1。</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">最后但并非最不重要的一点是，链接到文件：autolink.cpp。</span></div>
<div class="line"><span class="comment">  </span></div>
<div class="line"><span class="comment">\sa 在“参见”部分中，任何词都会被检查，因此 EType,</span></div>
<div class="line"><span class="comment">Val1, GVal1, ~Autolink_Test 和 member 将在 HTML 中被替换为链接。</span></div>
<div class="line"><span class="comment">*/</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">class </span>Autolink_Test</div>
<div class="line">{</div>
<div class="line">  <span class="keyword">public</span>:</div>
<div class="line">Autolink_Test(); <span class="comment">//!&lt; 构造函数 </span></div>
<div class="line">~Autolink_Test(); <span class="comment">//!&lt; 析构函数 </span></div>
<div class="line">    <span class="keywordtype">void</span> member(<span class="keywordtype">int</span>); <span class="comment">/**&lt; 成员函数。详情。*/</span></div>
<div class="line">    <span class="keywordtype">void</span> member(<span class="keywordtype">int</span>,<span class="keywordtype">int</span>); <span class="comment">/**&lt; 重载成员函数。详情 */</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/** 枚举类型。更多详情 */</span></div>
<div class="line">    <span class="keyword">enum</span> EType {</div>
<div class="line">Val1, <span class="comment">/**&lt; 枚举值 1 */</span></div>
<div class="line">Val2 <span class="comment">/**&lt; 枚举值 2 */</span></div>
<div class="line">    };                </div>
<div class="line"> </div>
<div class="line">  <span class="keyword">protected</span>:</div>
<div class="line">    <span class="keywordtype">int</span> var; <span class="comment">/**&lt; 成员变量 */</span></div>
<div class="line">};</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! 详情。*/</span></div>
<div class="line">Autolink_Test::Autolink_Test() { }</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! 详情。*/</span></div>
<div class="line">Autolink_Test::~Autolink_Test() { }</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! 全局变量。*/</span></div>
<div class="line"><span class="keywordtype">int</span> globVar;</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! 全局枚举。*/</span></div>
<div class="line"><span class="keyword">enum</span> GlobEnum {</div>
<div class="line">GVal1, <span class="comment">/*!&lt; 全局枚举值 1 */</span></div>
<div class="line">GVal2 <span class="comment">/*!&lt; 全局枚举值 2 */</span></div>
<div class="line">              };</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*!</span></div>
<div class="line"><span class="comment">* 宏定义。</span></div>
<div class="line"><span class="comment"> */</span> </div>
<div class="line"><span class="preprocessor">#define ABS(x) (((x)&gt;0)?(x):-(x))</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">typedef</span> Autolink_Test B;</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! \fn typedef Autolink_Test B</span></div>
<div class="line"><span class="comment">* 类型定义。</span></div>
<div class="line"><span class="comment"> */</span></div>
</div><!-- fragment -->点击 <a href="https://doxygen.cpp.org.cn/manual/examples/autolink/html/class_autolink___test.html">此处</a> 查看 Doxygen 生成的相应 HTML 文档。</dd></dl>
<h1 class="doxsection"><a class="anchor" id="resolving"></a> 类型别名</h1>
<p>涉及类、结构体和联合体的类型别名，例如</p><pre class="fragment"><div class="clipboard" title="Copy to clipboard"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#888" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></div>typedef struct StructName TypeName
</pre><p>为 StructName 创建一个别名，因此当遇到 StructName 本身或 TypeName 时，都会生成指向 StructName 的链接。</p>
<dl class="section user"><dt>示例</dt><dd><div class="fragment"><div class="clipboard" title="Copy to clipboard"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#888" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></svg></div><div class="line"><span class="comment">/*! \file restypedef.cpp</span></div>
<div class="line"><span class="comment">* 解析类型别名的示例。</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! \struct CoordStruct</span></div>
<div class="line"><span class="comment">* 坐标对。</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="keyword">struct </span>CoordStruct</div>
<div class="line">{<span class="comment"></span></div>
<div class="line"><span class="comment">/*! x 坐标 */</span></div>
<div class="line">  <span class="keywordtype">float</span> x;<span class="comment"></span></div>
<div class="line"><span class="comment">/*! y 坐标 */</span></div>
<div class="line">  <span class="keywordtype">float</span> y;</div>
<div class="line">};</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! 为 CoordStruct 创建一个类型名称 */</span> </div>
<div class="line"><span class="keyword">typedef</span> CoordStruct Coord;</div>
<div class="line"><span class="comment"></span> </div>
<div class="line"><span class="comment">/*! </span></div>
<div class="line"><span class="comment">* 此函数返回 \a c1 和 \a c2 的和，即</span></div>
<div class="line"><span class="comment">(c1.x+c2.x,c1.y+c2.y)</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line">Coord add(Coord c1,Coord c2)</div>
<div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment -->点击 <a href="https://doxygen.cpp.org.cn/manual/examples/restypedef/html/restypedef_8cpp.html">此处</a> 查看 Doxygen 生成的相应 HTML 文档。</dd></dl>
<p>前往 <a href="https://doxygen.cpp.org.cn/manual/output.html">下一节</a> 或返回 <a href="https://doxygen.cpp.org.cn/manual/index.html">索引</a>。</p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">由 <a href="https://doxygen.cpp.org.cn/index.html"><img class="footer" src="./Doxygen：自动链接生成 - Doxygen 文档生成工具_files/doxygen.svg" width="104" height="31" alt="doxygen"></a> 1.14.0 生成</li>
  </ul>
</div>
<script defer="" src="https:/#/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" data-cf-beacon="{&quot;rayId&quot;:&quot;9454838fda313da5&quot;,&quot;version&quot;:&quot;2025.4.0-1-g37f21b1&quot;,&quot;r&quot;:1,&quot;serverTiming&quot;:{&quot;name&quot;:{&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfSpeedBrain&quot;:true,&quot;cfCacheStatus&quot;:true}},&quot;token&quot;:&quot;d2dd7243eb4741c2b26bd9713bbc6840&quot;,&quot;b&quot;:1}" crossorigin="anonymous"></script>


</body></html>